<extend name="Public/frame" />
<block name="content-box">


<div style="width:780px;margin:10px auto;background:#FFF;padding:20px;">
    <form class="form-horizontal tpx-ajaxsubmit" role="form" action="{:U(CONTROLLER_NAME.'/userhandle?action=edit&id='.$data_id)}" method="post">

        <div class="panel panel-default">
            <div class="panel-heading">基本信息 UID:{$data_user.uid}</div>
            <div class="panel-body">

                <div class="row">


                    <div class="col-xs-12">
                        <div class="text-center" style="padding:0 0 10px 0;">
                            <img src="{$data_avatar_url}" />
                            <if condition="!empty($data_user['avatar_status'])">
                                <br />
                                <input type="checkbox" name="user_avatar_status" value="deleted" /> 删除
                            </if>
                        </div>
                    </div>

                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">用户</label>
                            <div class="col-sm-9">
                                <input name="user_username" type="text" class="form-control input-sm" placeholder="" value="{$data_user.username|htmlspecialchars}" />
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </div>

                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">
                                邮箱
                            </label>
                            <div class="col-sm-9">
                                <input name="user_email" type="text" class="form-control input-sm" placeholder="" value="{$data_user.email|htmlspecialchars}" />
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </div>

                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">手机</label>
                            <div class="col-sm-9">
                                <input name="user_cellphone" type="text" class="form-control input-sm" placeholder="" value="{$data_user.cellphone|htmlspecialchars}" />
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </div>

                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">密码</label>
                            <div class="col-sm-9">
                                <input name="user_password" type="text" class="form-control input-sm" placeholder="留空表示不修改" value="" />
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </div>

                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">注册</label>
                            <div class="col-sm-9">
                                <input type="text" class="form-control input-sm" placeholder="" value="{$data_user.reg_time|date='Y-m-d H:i:s',###} / {$data_user.reg_ip|long2ip}" readonly />
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </div>

                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">上次登录</label>
                            <div class="col-sm-9">
                                <input type="text" class="form-control input-sm" placeholder="" value="{$data_user.lastlogin_time|date='Y-m-d H:i:s',###} / {$data_user.lastlogin_ip|long2ip}" readonly />
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </div>

                </div>

            </div>
        </div>

        <div class="panel panel-default">
            <div class="panel-heading">账户管理</div>
            <div class="panel-body">

                <div class="row">

                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">用户状态</label>
                            <div class="col-sm-9">
                                <label class="checkbox-inline">
                                    <input type="radio" name="user_member_status" value="0" <if condition="$data_user['member_status'] eq 0">checked="checked"</if> /> 正常
                                </label>
                                <label class="checkbox-inline">
                                    <input type="radio" name="user_member_status" value="1" <if condition="$data_user['member_status'] eq 1">checked="checked"</if> /> 锁定
                                </label>
                                <label class="checkbox-inline">
                                    <input type="radio" name="user_member_status" value="2" <if condition="$data_user['member_status'] eq 2">checked="checked"</if> /> 未初始化
                                </label>
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </div>

                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">邮箱状态</label>
                            <div class="col-sm-9">
                                <label class="checkbox-inline">
                                    <input type="radio" name="user_email_status" value="0" <if condition="$data_user['email_status'] eq 0">checked="checked"</if> /> 未验证
                                </label>
                                <label class="checkbox-inline">
                                    <input type="radio" name="user_email_status" value="1" <if condition="$data_user['email_status'] eq 1">checked="checked"</if> /> 已验证
                                </label>
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </div>

                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">手机状态</label>
                            <div class="col-sm-9">
                                <label class="checkbox-inline">
                                    <input type="radio" name="user_cellphone_status" value="0" <if condition="$data_user['cellphone_status'] eq 0">checked="checked"</if> /> 未验证
                                </label>
                                <label class="checkbox-inline">
                                    <input type="radio" name="user_cellphone_status" value="1" <if condition="$data_user['cellphone_status'] eq 1">checked="checked"</if> /> 已验证
                                </label>
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </div>

                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">用户组</label>
                            <div class="col-sm-9">
                                <input name="user_gid" type="text" class="form-control input-sm" placeholder="" value="{$data_user.gid}" />
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </div>

                </div>


            </div>
        </div>


        <div class="panel panel-default">
            <div class="panel-heading">详细信息</div>
            <div class="panel-body">


                <div class="row">


                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">姓名</label>
                            <div class="col-sm-9">
                                <input name="profile_realname" type="text" class="form-control input-sm" placeholder="" value="{$data_profile.realname|htmlspecialchars}" />
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </div>

                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">性别</label>
                            <div class="col-sm-9">
                                <input name="profile_gender" type="text" class="form-control input-sm" placeholder="" value="{$data_profile.gender|htmlspecialchars}" />
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </div>

                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">年龄</label>
                            <div class="col-sm-9">
                                <input name="profile_age" type="text" class="form-control input-sm" placeholder="" value="{$data_profile.age|htmlspecialchars}" />
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </div>

                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">证件类型</label>
                            <div class="col-sm-9">
                                <input name="profile_idcardtype" type="text" class="form-control input-sm" placeholder="" value="{$data_profile.idcardtype|htmlspecialchars}" />
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </div>

                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">证件号</label>
                            <div class="col-sm-9">
                                <input name="profile_idcard" type="text" class="form-control input-sm" placeholder="" value="{$data_profile.idcard|htmlspecialchars}" />
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </div>

                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">兴趣</label>
                            <div class="col-sm-9">
                                <input name="profile_interest" type="text" class="form-control input-sm" placeholder="" value="{$data_profile.interest|htmlspecialchars}" />
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </div>

                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">QQ</label>
                            <div class="col-sm-9">
                                <input name="profile_qq" type="text" class="form-control input-sm" placeholder="" value="{$data_profile.qq|htmlspecialchars}" />
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </div>

                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">微信</label>
                            <div class="col-sm-9">
                                <input name="profile_wechat" type="text" class="form-control input-sm" placeholder="" value="{$data_profile.wechat|htmlspecialchars}" />
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </div>

                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">出生年</label>
                            <div class="col-sm-9">
                                <input name="profile_birth_year" type="text" class="form-control input-sm" placeholder="" value="{$data_profile.birth_year|htmlspecialchars}" />
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </div>

                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">出生月</label>
                            <div class="col-sm-9">
                                <input name="profile_birth_month" type="text" class="form-control input-sm" placeholder="" value="{$data_profile.birth_month|htmlspecialchars}" />
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </div>

                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">出生日</label>
                            <div class="col-sm-9">
                                <input name="profile_birth_day" type="text" class="form-control input-sm" placeholder="" value="{$data_profile.birth_day|htmlspecialchars}" />
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </div>

                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">省</label>
                            <div class="col-sm-9">
                                <input name="profile_addr_province" type="text" class="form-control input-sm" placeholder="" value="{$data_profile.addr_province|htmlspecialchars}" />
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </div>

                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">城市</label>
                            <div class="col-sm-9">
                                <input name="profile_addr_city" type="text" class="form-control input-sm" placeholder="" value="{$data_profile.addr_city|htmlspecialchars}" />
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </div>

                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">区</label>
                            <div class="col-sm-9">
                                <input name="profile_addr_dist" type="text" class="form-control input-sm" placeholder="" value="{$data_profile.addr_dist|htmlspecialchars}" />
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </div>

                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">街道</label>
                            <div class="col-sm-9">
                                <input name="profile_addr_community" type="text" class="form-control input-sm" placeholder="" value="{$data_profile.addr_community|htmlspecialchars}" />
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </div>

                    <div class="col-xs-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">具体地址</label>
                            <div class="col-sm-9">
                                <input name="profile_addr_detail" type="text" class="form-control input-sm" placeholder="" value="{$data_profile.addr_detail|htmlspecialchars}" />
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </div>


                </div>


            </div>
        </div>


        <div class="panel panel-default">
            <div class="panel-heading">绑定信息</div>
            <div class="panel-body">
                <foreach name="data_bind" item="v">
                    <p>{$v.type} : {$v.content}</p>
                </foreach>
            </div>
        </div>

        <?php if(!defined('TPX_VERSION')){ ?>
        <div class="panel panel-default">
            <div class="panel-heading">关注信息</div>
            <div class="panel-body">
                <p>关注：{$data_follow.follow_uids|join=',',###}</p>
                <p>被关注：{$data_follow.be_followed_uids|join=',',###}</p>
            </div>
        </div>

        <div class="panel panel-default">
            <div class="panel-heading">数字信息</div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-xs-4">
                        <p>消息 : {$data_user.cnt_msg}</p>
                    </div>
                    <div class="col-xs-4">
                        <p>朋友 : {$data_user.cnt_friend}</p>
                    </div>
                    <div class="col-xs-4">
                        <p>关注 : {$data_user.cnt_follow}</p>
                    </div>
                    <div class="col-xs-4">
                        <p>被关注 : {$data_user.cnt_be_followed}</p>
                    </div>
                    <div class="col-xs-4">
                        <p>朋友 : {$data_user.cnt_friend}</p>
                    </div>
                </div>
            </div>
        </div>
        <?php } ?>

        <if condition="!empty($data_upload_space)">
            <div class="panel panel-default">
                <div class="panel-heading">上传下载</div>
                <div class="panel-body">
                    <div class="row">
                        <div class="col-xs-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">上传空间</label>
                                <div class="col-sm-9">
                                    <input name="upload_space_space" type="text" class="form-control input-sm" placeholder="" value="{$data_upload_space.space|byte_format|htmlspecialchars}" />
                                    <div class="help-block"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </if>

        <if condition="!empty($data_role_list)">
            <div class="panel panel-default">
                <div class="panel-heading">用户角色</div>
                <div class="panel-body">
                    <div class="row">
                        <div class="col-xs-6">
                            <div class="form-group">
                                <div class="col-sm-9">
                                    <foreach name="data_role_list" item="i">
                                        <label style="padding-right:1em;">
                                            <if condition="isset($data_roles[$i['id']])">
                                                <input name="roles[]" type="checkbox" value="{$i.id}" checked />
                                            <else />
                                                <input name="roles[]" type="checkbox" value="{$i.id}" />
                                            </if>
                                            {$i.name|htmlspecialchars}
                                        </label>
                                    </foreach>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </if>



        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-9">
                <button type="submit" class="btn btn-primary">{$Think.lang.submit}</button>
            </div>
        </div>

    </form>
</div>


</block>